'Desktop (instantiate JTF COM Wrapper)
Set desktop = CreateObject("SilkTestLib.Desktop")

'Base State
Function BaseState()
    executable = "C:\Program Files\Internet Explorer\iexplore.exe"
    'executable = "C:\Program Files\Mozilla Firefox\firefox.exe"
    url = "http://demo.borland.com/InsuranceWebExtJS/"
    locator = "/BrowserApplication/BrowserWindow"
    techDomains = "xBrowser"
    Set BaseState = desktop.ExecuteBrowserBaseState(executable, url, locator, techDomains)
End Function

'Simple Testcase
Sub SimpleTest()
    Set browser = BaseState()
    Set domListBox = browser.Find("//SELECT[@id='quick-link:jump-menu']")
    domListBox.Select "Auto Quote"
    browser.Find("//INPUT[@id='autoquote:zipcode']").SetText "4040"
    browser.Find("//INPUT[@id='autoquote:e-mail']").SetText "john.smith@gmail.com"
    browser.Find("//INPUT[@id='autoquote:vehicle:0']").Select
    browser.Find("//INPUT[@id='autoquote:next']").Select
    browser.Find("//INPUT[@id='autoquote:age']").SetText "32"
    browser.Find("//INPUT[@id='autoquote:gender:0']").Select
    browser.Find("//INPUT[@id='autoquote:type:0']").Select
    browser.Find("//INPUT[@id='autoquote:next']").Select
    browser.Find("//INPUT[@id='autoquote:year']").SetText "2009"
    browser.Find("//DIV[@id='carMakesDIV']").Find("//IMG[@src='http://extjs.com/s.gif']").DomClick
    browser.Find("//DIV[@textContents='Lexus']").DomClick
    browser.Find("//DIV[@id='carModelsDIV']").Find("//IMG[@src='http://extjs.com/s.gif']").DomClick
    browser.Find("//DIV[@textContents='LS600h']").DomClick
    browser.Find("//INPUT[@id='autoquote:finInfo:0']").Select
    browser.Find("//INPUT[@id='autoquote:next']").Select
End Sub

SimpleTest

